package com.wn.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * @author yellow Docter
 * @date 2022 -07-05
 * @desc
 *
 * servlet 是处理请求
 * Filter 是 拦截请求
 *
 */
public class Demo01Filter implements Filter {
    
    // 每次请求都会执行 doFilter
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("Demo01Filter.doFilter");

        // 放行的方法
        chain.doFilter(request, response);
    }

}
